/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MailData.java
 *
 * Created on Mar 4, 2009, 7:40:30 PM
 */

package ar.com.gianazza.dumbster.gui;

import javax.swing.text.html.HTMLEditorKit;

/**
 *
 * @author gianu
 */
public class MailData extends javax.swing.JDialog {

    /** Creates new form MailData */
    public MailData(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        mailDataMessage.setEditable(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        okButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        mailDataFrom = new javax.swing.JLabel();
        mailDataTo = new javax.swing.JLabel();
        mailDataDate = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        mailDataSubject = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        mailDataMessage = new javax.swing.JEditorPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ar.com.gianazza.dumbster.gui.DumbsterGUIApp.class).getContext().getResourceMap(MailData.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        okButton.setText(resourceMap.getString("okButton.text")); // NOI18N
        okButton.setName("okButton"); // NOI18N
        okButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okButtonActionPerformed(evt);
            }
        });

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setFont(resourceMap.getFont("jLabel4.font")); // NOI18N
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        mailDataFrom.setText(resourceMap.getString("mailDataFrom.text")); // NOI18N
        mailDataFrom.setName("mailDataFrom"); // NOI18N

        mailDataTo.setText(resourceMap.getString("mailDataTo.text")); // NOI18N
        mailDataTo.setName("mailDataTo"); // NOI18N

        mailDataDate.setFont(resourceMap.getFont("mailDataDate.font")); // NOI18N
        mailDataDate.setText(resourceMap.getString("mailDataDate.text")); // NOI18N
        mailDataDate.setName("mailDataDate"); // NOI18N

        jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        mailDataSubject.setText(resourceMap.getString("mailDataSubject.text")); // NOI18N
        mailDataSubject.setName("mailDataSubject"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        mailDataMessage.setEditorKit(new HTMLEditorKit());
        mailDataMessage.setName("mailDataMessage"); // NOI18N
        jScrollPane1.setViewportView(mailDataMessage);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, okButton)
                    .add(layout.createSequentialGroup()
                        .add(jLabel1)
                        .add(18, 18, 18)
                        .add(mailDataFrom, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE))
                    .add(layout.createSequentialGroup()
                        .add(jLabel2)
                        .add(39, 39, 39)
                        .add(mailDataTo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE))
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel5)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                            .add(jScrollPane1))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel4)
                            .add(36, 36, 36)
                            .add(mailDataSubject, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel3)
                            .add(37, 37, 37)
                            .add(mailDataDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 274, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(mailDataFrom))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(mailDataTo))
                .add(18, 18, 18)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel3)
                    .add(mailDataDate))
                .add(18, 18, 18)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel4)
                    .add(mailDataSubject))
                .add(29, 29, 29)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel5)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 299, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 14, Short.MAX_VALUE)
                .add(okButton))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        this.setVisible(false);
        this.dispose();
    }//GEN-LAST:event_okButtonActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel mailDataDate;
    private javax.swing.JLabel mailDataFrom;
    private javax.swing.JEditorPane mailDataMessage;
    private javax.swing.JLabel mailDataSubject;
    private javax.swing.JLabel mailDataTo;
    private javax.swing.JButton okButton;
    // End of variables declaration//GEN-END:variables

    public void setTo(String to) {
        this.mailDataTo.setText(to);
    }

    public void setFrom(String from) {
        this.mailDataFrom.setText(from);
    }

    public void setDate(String date) {
        this.mailDataDate.setText(date);
    }

    public void setMessage(String message) {
        this.mailDataMessage.setText(message);
    }

    public void setSubject(String subject) {
        this.mailDataSubject.setText(subject);
    }
}
